package com.ssy.lingxi.pay.api.dto.request.assetAccount;

import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 余额返现
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/11/14
 */
@Data
public class BalanceCashbackRequest implements Serializable {
    private static final long serialVersionUID = -396255615293307401L;
    /**
     * 会员id
     */
    @NotNull(message = "会员id不能为空")
    @Positive(message = "会员id要大于0")
    private Long memberId;

    /**
     * 会员角色id
     */
    @NotNull(message = "会员角色id不能为空")
    @Positive(message = "会员角色id要大于0")
    private Long memberRoleId;

    /**
     * 父级会员id
     */
    @NotNull(message = "父级会员id不能为空")
    @Positive(message = "父级会员id要大于0")
    private Long parentMemberId;

    /**
     * 父级会员角色id
     */
    @NotNull(message = "父级会员角色id不能为空")
    @Positive(message = "父级会员角色id要大于0")
    private Long parentMemberRoleId;

    /**
     * 返现账号类型: 1-平台账户; 2-会员账户;
     */
    @NotNull(message = "返现账号类型不能为空")
    @Positive(message = "返现账号类型要大于0")
    private Integer cashbackType;

    /**
     * 返现金额
     */
    @NotNull(message = "返现金额要大于等于0")
    @PositiveOrZero(message = "返现金额要大于等于0")
    private Double cashbackMoney;

    /**
     * 返现订单编码
     */
    @NotBlank(message = "返现订单编码不能为空")
    @Size(max = 20, message = "返现订单编码最长20个字符")
    private String orderCode;

    /**
     * 原因/备注
     */
    private String remark;
}
